//
// Created by BaiXin on 2025/8/20.
//
# include "iostream"
# include "windows.h"

using namespace std;

int main() {
    SetConsoleOutputCP(CP_UTF8);


    int *pArr = new int[5]{1, 2, 3, 4, 5};

    int *pNewArr = new int[7];

    int offset = 0;
    for (int i = 0; i < 7; i++) {
        if (i == 2) {
            pNewArr[i] = 11;
            offset += 1;
            continue;
        } else if (i == 4) {
            pNewArr[i] = 22;
            offset += 1;
            continue;
        }
        pNewArr[i] = pArr[i - offset];
    }

    delete[] pArr;
    pArr = pNewArr;
    for (int i = 0; i < 7; i++) {
        cout << pNewArr[i] << endl;
    }
    return 0;
}
